Skip to content

Add parFlatTraverseN and parFlatSequenceN#4468

Open
yhefamly wants to merge 2 commits intotypelevel:series/3.xfrom
yhefamly:add-parflattraversen
Open

Add parFlatTraverseN and parFlatSequenceN#4468
yhefamly wants to merge 2 commits intotypelevel:series/3.xfrom
yhefamly:add-parflattraversen

Conversation

@yhefamly
Copy link
Contributor

@yhefamly yhefamly commented Aug 8, 2025

Add equivalents of the Parallel methods that allow flattening the result of a limited parallel traversal. These are helpful in case like big database lookups, where a set of IDs is batched, then each batch is queried and produces a collection of results that needs to be flattened into a larger result.

If #4451 is merged, the implementations in this PR should be aligned, either by delegation and flattening afterwards or by using a customised variant of the new code.

Add equivalents of the Parallel methods that allow flattening the result of a limited parallel traversal. These are helpful in case like big database lookups, where a set of IDs is batched, then each batch is queried and produces a collection of results that needs to be flattened into a larger result.
@djspiewak
Copy link
Member

This is excellent but I'd definitely like to push pause until #4451 lands just to make sure we avoid creating more conflicting implementations. I'll try to prioritize getting that over the line.

@djspiewak
Copy link
Member

Alright! Now that #4451 is somewhat on sane footing, we can safely revisit this. These functions are going to need similar bespoke treatment (and extensive tests). Unfortunately, we also missed the boat on inclusion in 3.7.0 (mostly because it took me forever to fix up the other PR), so this will have to wait for 3.8.0 due to our forward compatibility model.

@djspiewak djspiewak added this to the v3.8.0 milestone Mar 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants